import * as React from 'react'
const {useState} = React


const App = () => {
    const [count, setCount] = useState(0)
    const [count2, setCount2] = useState(0)
    const [count3, setCount3] = useState(0)

    const handleAdd = () => {
        setCount(count => count + 1)
        setCount2(count => count + 1)
        setCount3(count => count + 1)
    }

    return <div>
        <h1>count: {count}  count2: {count2} count3: {count3}</h1>
        <button onClick={handleAdd}>count+1</button>
    </div>
}

export default App